<template>
  <div>
    <div class="root">
      <div>
        <div class="root-img">
          <img src="../assets/bg.png" alt="" />
        </div>
        <div class="root-box">
          <div class="root-youke">游客</div>
          <van-button type="info" size="small" class="btndeng" @click="btndeng"
            >去登录</van-button
          >
        </div>
        <div>
          <img class="imgavatar" src="../assets/avatar.png" alt="" />
        </div>
      </div>
      <div class="van-grid-item">
        <van-grid :column-num="3" :gutter="10">
          <van-grid-item icon="star-o" to="/login" text="我的收藏" />
          <van-grid-item icon="wap-home-o" to="/login" text="我的出租" />
          <van-grid-item icon="clock-o" text="看房记录" />
          <van-grid-item icon="idcard" text="成为房主" />
          <van-grid-item icon="contact" text="个人资料" />
          <van-grid-item icon="service-o" text="联系我们" />
        </van-grid>
      </div>
      <div>
        <img src="../assets/join.png" alt="" class="imgjoin" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MyCom",
  components: {},
  props: {},
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    btndeng() {
      this.$router.push("/login");
    },
  },
};
</script>

<style scoped lang="less">
* {
  margin: 0;
  padding: 0;
}
img {
  width: 100%;
}
.root-box {
  position: absolute;
  background-color: #fff;
  width: 75%;
  height: 22%;
  margin-top: 33%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px 3px #ddd;
  top: 0;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
}
.imgavatar {
  position: absolute;
  width: 15%;
  top: 12%;
  left: 41%;
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: 0 0 10px 5px #ddd;
}
.root-youke {
  padding-top: 20%;
  text-align: center;
}
.btndeng {
  margin-top: 10px;
  height: 20%;
  width: 23%;
  border-radius: 10%;
}
.van-grid-item {
  margin-top: 12%;
}
.imgjoin {
  width: 94%;
  padding-left: 3%;
}
</style>
